Skip to content

Conversation

@its-mitesh-kumar
Copy link
Member

@its-mitesh-kumar its-mitesh-kumar commented Jan 27, 2026

Description

  • Adds Escape key functionality to cycle through chatbot display modes
  • Pressing Escape transitions: Fullscreen → Docked → Overlay → Close (FAB only)
  • Settings dropdown closes on first Escape; display mode cycles on subsequent presses
  • Works correctly across all display modes without breaking existing functionality

UI after changes

Screen.Recording.2026-01-27.at.10.42.18.PM.mov

Fixes

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
@sonarqubecloud
Copy link

@its-mitesh-kumar
Copy link
Member Author

/cc @HusneShabbir @aprilma419

@rhdh-gh-app
Copy link

rhdh-gh-app bot commented Jan 27, 2026

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-lightspeed workspaces/lightspeed/plugins/lightspeed patch v1.2.1

Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've observed a deviation where using the keyboard's Escape key to exit the chat actions menu impacts the Lightspeed display mode. This issue occurs most of the time and is reproducible. Please find the attached recording for reference.

Screen.Recording.2026-01-27.at.11.53.54.PM.mov

Copy link
Contributor

@HusneShabbir HusneShabbir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aprilma419 what’s your take on the above observation?

@aprilma419
Copy link

@HusneShabbir looks good, didn't see any issues so far IMO

Copy link
Member

@karthikjeeyar karthikjeeyar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! I have a suggestion on finding the open modals, PTAL

Comment on lines +228 to +234
// Check if any modal dialog is currently visible (Delete, Rename, etc.)
const hasOpenModal = document.querySelector('.MuiDialog-root');

// If settings dropdown or modal is open, let those handle Escape first
if (isSettingsDropdownOpen || hasOpenModal) {
return;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a brittle implementation and could break if MUI class names are changed or if we start using BUI instead of MUI.

const hasOpenModal = document.querySelector('.MuiDialog-root');

Comment on lines +84 to +88
isSettingsDropdownOpen: boolean;
/**
* Setter for settings dropdown open state
*/
setIsSettingsDropdownOpen: (isOpen: boolean) => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is related to my previous comment.

Can you use similar approach to track if the rename/delete/attachment modals are open so that you can use that information to see if any modals are open, rather than relying on className .MuiDialog-root ?

pseudo code:

  const [openModals, setOpenModals] = useState<Set<string>>(new Set());

 const openModal = useCallback((modalId: string) => {
    setOpenModals(prev => new Set(prev).add(modalId));
  }, []);

  const closeModal = useCallback((modalId: string) => {
    setOpenModals(prev => {
      const next = new Set(prev);
      next.delete(modalId);
      return next;
    });
    

Then context can expose method and properties like openModal, closeModal, hasOpenModals etc, so that you can use this to decide whether to perform any action or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants